<?php
declare(strict_types=1);

namespace app\admin\controller;

use app\common\controller\AdminController;
use app\common\utils\JsonResponse;
use think\App;

class UserInfo extends AdminController
{
    /**
     * 构造方法
     * @param App $app
     */
    public function __construct(App $app)
    {
        parent::__construct($app);
    }
    
    /**
     * 获取当前登录管理员信息
     */
    public function index()
    {
        try {
            $adminInfo = $this->adminService->getAdminInfo($this->adminId);
            return JsonResponse::success($adminInfo);
        } catch (\Exception $e) {
            return JsonResponse::error($e->getMessage());
        }
    }
} 